Skip to content

Conversation

@tansdf
Copy link
Collaborator

@tansdf tansdf commented Jul 21, 2025

  • Moved the application to a new configuration structure
  • Added possibility to validate the impulse yaml using the --check key during the app start
  • Adde the config hot reload handling the HUP system signal

- Replaced direct YAML loading with a new configuration loader that validates and transforms the configuration into a legacy format.
- Introduced error handling for configuration validation failures, providing user-friendly messages and documentation links.
- Added `pydantic` dependency for enhanced configuration validation.
- Created new modules for configuration loading and validation to improve code organization.
- Added missing newlines at the end of files in `loader.py` and `validation.py` to adhere to PEP 8 standards.
- Integrated a custom logger for error messages in `config.py`, `loader.py`, and improved error handling for configuration validation failures.
- Replaced print statements with logger calls to provide better error tracking and maintainability.
- Introduced a unified configuration system that combines environment variables and application settings for improved maintainability and backward compatibility.
- Updated `config.py`, `main.py`, and various application modules to utilize the new configuration structure.
- Enhanced error handling and logging for configuration loading and validation processes.
- Removed deprecated direct environment variable access in favor of the new configuration methods.
- Added SIGHUP signal handler for dynamic configuration reloading without restarting the application.
- Introduced command-line argument parsing to validate configuration and exit if requested.
- Updated `load_unified_config` and `reload_config` functions for improved error handling and logging.
- Enhanced the `validate_config_only` function to provide detailed validation feedback.
- Refactored `main.py` to integrate new features and improve application startup logic.
- Updated `reload_config` function to check for application type consistency before applying new configurations.
- Added logging for scenarios where the application type has changed, ensuring current configuration is retained in such cases.
- Moved the setup of the SIGHUP signal handler to the main execution block to ensure it is only set when the application is run directly, improving clarity and control over signal handling during application startup.
- Updated the application configuration structure to introduce specific classes for different application types, enhancing clarity and maintainability.
- Improved the channel initialization logic in `ChannelManager` to handle missing channel definitions more gracefully and ensure default channels are used appropriately.
- Added utility methods for extracting channel IDs and validating configuration structures, streamlining the configuration validation process.
- Enhanced incident handling by introducing methods to extract step types and values, improving code readability and maintainability.
- Updated the application type references in `main.py` and `validation.py` to use the `ApplicationType` enum for improved clarity and consistency.
- Changed the `NULL` value to `NONE` in the `ApplicationType` enum to better reflect its purpose.
- Adjusted related logic in the `NullApplicationConfig` and validation methods to align with the updated enum values.
- Update IncidentNotifications adding `new_firing` and `partial_resolved`
- Changed actual incident version
@tansdf tansdf force-pushed the tansdf/config-validation branch from 01176ec to e1cdcee Compare September 22, 2025 21:36
@tansdf tansdf merged commit 94b82cf into develop Sep 22, 2025
@tansdf tansdf deleted the tansdf/config-validation branch September 22, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add reload command to validate and reload configuration Add --check option for config verification

3 participants